import request from '/src/axios.js';
import {baseUrl} from "../../config/env";

export const postApi = {
  getPage: (current, size, params) => request({
    url: baseUrl + '/api-user/post/postPage',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  }),
  getPostList: () => request({
    url: baseUrl + '/api-user/post/select',
    method: 'get'
  }),
  getDetail: (id) => request({
    url: baseUrl + '/api-user/post/detail',
    method: 'get',
    params: {
      id
    }
  }),
  remove: (ids) => request({
    url: baseUrl + '/api-user/post/remove',
    method: 'post',
    params: {
      ids,
    }
  }),
  create: (row) => request({
    url: baseUrl + '/api-user/post/create',
    method: 'post',
    data: row
  }),
  update: (row) => request({
    url: baseUrl + '/api-user/post/update',
    method: 'post',
    data: row
  })
}

